package wechat.handler.bean.response.message.reply;

import org.dom4j.DocumentException;

import wechat.handler.bean.response.MessageBaseBean;

/**
 * 图片消息
 * 
 *
 */
public class ReplyImageBean extends MessageBaseBean {

	private String MediaId;
	
	public ReplyImageBean(String str) throws DocumentException {
		super(str);
		super.setMsgType(Reply_Message_Image);
	}
	
	public ReplyImageBean(){
		super.setMsgType(Reply_Message_Image);
	}


	public String getMediaId() {
		return MediaId;
	}

	public void setMediaId(String mediaId) {
		MediaId = mediaId;
	}

	
//	protected static final String Xpath_PicUrl = "/xml/PicUrl";
//	protected static final String Xpath_MediaId = "/xml/MediaId";
//	
//	public void transform() throws Exception {
//		super.transform();
//		this.setPicUrl(getNodeText(Xpath_PicUrl));
//		this.setMediaId(getNodeText(Xpath_MediaId));
//	}
	
	
	public String buildXml() throws Exception {
		super.buildXml();
		super.addNode("Image").addElement("MediaId").addCDATA(getMediaId());
		return parent.asXML();
	}




}
